//
//  gerenjiaoyixinxiViewController.m
//  个人信息
//
//  Created by IOSchengxuyuan on 15/12/7.
//  Copyright © 2015年 com.ppfur. All rights reserved.
//

#import "gerenjiaoyixinxiViewController.h"

@interface gerenjiaoyixinxiViewController (){
    float aa,bb;
    float width,height;
    UITableViewCell*cell;
    long o;
}

@end

@implementation gerenjiaoyixinxiViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    _mytable.delegate=self;
    _mytable.dataSource=self;
    width=[UIScreen mainScreen].bounds.size.width;
    height=[UIScreen mainScreen].bounds.size.height;
    aa=width/320;
    bb=height/568;
    _mytable.frame=CGRectMake(0, 0, width, height);
    _mytable.scrollEnabled=NO;
    o=1;
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 6;
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 50;
}
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
    return 1;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    
    [tableView deselectRowAtIndexPath:indexPath animated:NO];
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    static NSString *id=@"row";
    cell=[tableView dequeueReusableCellWithIdentifier:id];
    if (cell==nil)
    {
        cell=[[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:id];
    }
    NSArray *row1=[cell.contentView subviews];
//    cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    for (UIView *vv2 in row1)
    {
        [vv2 removeFromSuperview];
    }
    if(width==320){
        if (indexPath.row==0) {
            UILabel*ll1=[[UILabel alloc] initWithFrame:CGRectMake(10*aa, 10*bb, 50*aa, 20*bb)];
            ll1.text=@"用户名";
            ll1.font=[UIFont systemFontOfSize:14.0f];
            [cell.contentView addSubview:ll1];
            UILabel*ll2=[[UILabel alloc] initWithFrame:CGRectMake(270*aa, 10*bb, 50*aa, 20*bb)];
            ll2.text=@"杨健博";
            ll2.font=[UIFont systemFontOfSize:14.0f];
            [cell.contentView addSubview:ll2];
            
        }else if(indexPath.row==1){
            UILabel*ll1=[[UILabel alloc] initWithFrame:CGRectMake(10*aa, 10*bb, 50*aa, 20*bb)];
            ll1.text=@"性别";
            ll1.font=[UIFont systemFontOfSize:14.0f];
            [cell.contentView addSubview:ll1];
            UILabel*ll2=[[UILabel alloc] initWithFrame:CGRectMake(285*aa, 10*bb, 50*aa, 20*bb)];
            ll2.text=@"男";
            ll2.font=[UIFont systemFontOfSize:14.0f];
            [cell.contentView addSubview:ll2];
        }else if(indexPath.row==2){
            UILabel*ll1=[[UILabel alloc] initWithFrame:CGRectMake(10*aa, 10*bb, 50*aa, 20*bb)];
            ll1.text=@"生日";
            ll1.font=[UIFont systemFontOfSize:14.0f];
            [cell.contentView addSubview:ll1];
            UILabel*ll2=[[UILabel alloc] initWithFrame:CGRectMake(240*aa, 10*bb, 80*aa, 20*bb)];
            ll2.text=@"2015-11-11";
            ll2.font=[UIFont systemFontOfSize:14.0f];
            [cell.contentView addSubview:ll2];
        }else if(indexPath.row==3){
            UILabel*ll1=[[UILabel alloc] initWithFrame:CGRectMake(10*aa, 10*bb, 50*aa, 20*bb)];
            ll1.text=@"居住地";
            ll1.font=[UIFont systemFontOfSize:14.0f];
            [cell.contentView addSubview:ll1];
            UILabel*ll2=[[UILabel alloc] initWithFrame:CGRectMake(225*aa, 10*bb, 100*aa, 20*bb)];
            ll2.text=@"黑龙江哈尔滨";
            ll2.font=[UIFont systemFontOfSize:14.0f];
            [cell.contentView addSubview:ll2];
        }else if(indexPath.row==4){
            UILabel*ll1=[[UILabel alloc] initWithFrame:CGRectMake(10*aa, 10*bb, 60*aa, 20*bb)];
            ll1.text=@"详细地址";
            ll1.font=[UIFont systemFontOfSize:14.0f];
            [cell.contentView addSubview:ll1];
            UILabel*ll2=[[UILabel alloc] initWithFrame:CGRectMake(120*aa, 10*bb, 210*aa, 20*bb)];
            ll2.text=@"黑龙江哈尔滨黑龙江哈尔滨黑龙";
            ll2.font=[UIFont systemFontOfSize:14.0f];
            [cell.contentView addSubview:ll2];
        }else if(indexPath.row==5){
            UILabel*ll1=[[UILabel alloc] initWithFrame:CGRectMake(10*aa, 10*bb, 60*aa, 20*bb)];
            ll1.text=@"手机号码";
            ll1.font=[UIFont systemFontOfSize:14.0f];
            [cell.contentView addSubview:ll1];
            UILabel*ll2=[[UILabel alloc] initWithFrame:CGRectMake(225*aa, 10*bb, 100*aa, 20*bb)];
            ll2.text=@"12345678911";
            ll2.font=[UIFont systemFontOfSize:14.0f];
            [cell.contentView addSubview:ll2];
        }
    }
    else{
    if (indexPath.row==0) {
        UILabel*ll1=[[UILabel alloc] initWithFrame:CGRectMake(10*aa, 10*bb, 50*aa, 20*bb)];
        ll1.text=@"用户名";
        ll1.font=[UIFont systemFontOfSize:14.0f];
        [cell.contentView addSubview:ll1];
        UILabel*ll2=[[UILabel alloc] initWithFrame:CGRectMake(275*aa, 10*bb, 50*aa, 20*bb)];
        ll2.text=@"杨健博";
        ll2.font=[UIFont systemFontOfSize:14.0f];
        [cell.contentView addSubview:ll2];

    }else if(indexPath.row==1){
        UILabel*ll1=[[UILabel alloc] initWithFrame:CGRectMake(10*aa, 10*bb, 50*aa, 20*bb)];
        ll1.text=@"性别";
        ll1.font=[UIFont systemFontOfSize:14.0f];
        [cell.contentView addSubview:ll1];
        UILabel*ll2=[[UILabel alloc] initWithFrame:CGRectMake(285*aa, 10*bb, 50*aa, 20*bb)];
        ll2.text=@"男";
        ll2.font=[UIFont systemFontOfSize:14.0f];
        [cell.contentView addSubview:ll2];
    }else if(indexPath.row==2){
        UILabel*ll1=[[UILabel alloc] initWithFrame:CGRectMake(10*aa, 10*bb, 50*aa, 20*bb)];
        ll1.text=@"生日";
        ll1.font=[UIFont systemFontOfSize:14.0f];
        [cell.contentView addSubview:ll1];
        UILabel*ll2=[[UILabel alloc] initWithFrame:CGRectMake(250*aa, 10*bb, 80*aa, 20*bb)];
        ll2.text=@"2015-11-11";
        ll2.font=[UIFont systemFontOfSize:14.0f];
        [cell.contentView addSubview:ll2];
    }else if(indexPath.row==3){
        UILabel*ll1=[[UILabel alloc] initWithFrame:CGRectMake(10*aa, 10*bb, 50*aa, 20*bb)];
        ll1.text=@"居住地";
        ll1.font=[UIFont systemFontOfSize:14.0f];
        [cell.contentView addSubview:ll1];
        UILabel*ll2=[[UILabel alloc] initWithFrame:CGRectMake(240*aa, 10*bb, 80*aa, 20*bb)];
        ll2.text=@"黑龙江哈尔滨";
        ll2.font=[UIFont systemFontOfSize:14.0f];
        [cell.contentView addSubview:ll2];
    }else if(indexPath.row==4){
        UILabel*ll1=[[UILabel alloc] initWithFrame:CGRectMake(10*aa, 10*bb, 60*aa, 20*bb)];
        ll1.text=@"详细地址";
        ll1.font=[UIFont systemFontOfSize:14.0f];
        [cell.contentView addSubview:ll1];
        UILabel*ll2=[[UILabel alloc] initWithFrame:CGRectMake(140*aa, 10*bb, 170*aa, 20*bb)];
        ll2.text=@"黑龙江哈尔滨黑龙江哈尔滨黑龙";
        ll2.font=[UIFont systemFontOfSize:14.0f];
        [cell.contentView addSubview:ll2];
    }else if(indexPath.row==5){
        UILabel*ll1=[[UILabel alloc] initWithFrame:CGRectMake(10*aa, 10*bb, 60*aa, 20*bb)];
        ll1.text=@"手机号码";
        ll1.font=[UIFont systemFontOfSize:14.0f];
        [cell.contentView addSubview:ll1];
        UILabel*ll2=[[UILabel alloc] initWithFrame:CGRectMake(235*aa, 10*bb, 80*aa, 20*bb)];
        ll2.text=@"12345678911";
        ll2.font=[UIFont systemFontOfSize:14.0f];
        [cell.contentView addSubview:ll2];
    }
    }
    return cell;
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
